home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Menus / High Level / FixedMenuSection.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  541 b   |  29 lines  |  [TEXT/CWIE]

  1. // FixedMenuSection.cp
  2.  
  3. #ifndef FixedMenuSection_h
  4. #include "FixedMenuSection.h"
  5. #endif
  6.  
  7. FixedMenuSection::FixedMenuSection( Menu& menu, uint16 length )
  8.   : MenuSection( menu, length )
  9.   {
  10.   }
  11.  
  12. MenuItem FixedMenuSection::operator[]( uint16 index )
  13.   {
  14.     Assert( index < maxLength );
  15.     return menu[ firstItem + index ];
  16.   }
  17.  
  18. void FixedMenuSection::EnableAll()
  19.   {
  20.     for ( uint16 i = 0; i < Length(); i++ )
  21.         (*this)[i].Enable(); 
  22.   }
  23.  
  24. void FixedMenuSection::DisableAll()
  25.   {
  26.     for ( uint16 i = 0; i < Length(); i++ )
  27.         (*this)[i].Disable(); 
  28.   }
  29.